.TH GPTfinalize 3 "February, 2007" "GPTL"

.SH NAME
GPTLfinalize \- Finalize the GPTL environment (free memory, etc).

.SH SYNOPSIS
.B C/C++ Interface:
.nf
#include <gptl.h>
int GPTLfinalize (void);
.fi

.B Fortran Interface:
.nf
use gptl
integer gptfinalize ()
.fi

.SH DESCRIPTION
Finalizes the GPTL environment.  All internally allocated space is freed.

.SH RESTRICTIONS
This routine must be called only by the master thread. Further use of the library after
.B GPTLfinalize()
requires another invocation of
.B GPTLinitialize()

.SH RETURN VALUES
On success, this function returns 0.
On error, a negative error code is returned and a descriptive message
printed. 

.SH EXAMPLES
.nf         
.if t .ft CW

if (GPTLfinalize () != 0)
  handle_error (1);

.if t .ft P
.fi

.SH BUGS
It is not adequate to call this function and then subsequently invoke
.B GPTLinitialize()
again. It should be but the code isn't there yet.

.SH SEE ALSO
.BR GPTLinitialize "(3)" 
